package com.bailian.spring.ioc.complex_di;

import com.bailian.spring.ioc.complex_di.bean.Cat;
import com.bailian.spring.ioc.complex_di.bean.Dog;
import com.bailian.spring.ioc.complex_di.config.ComplexDiConfig;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author gaoxu
 * date: Created on 2021/10/29 下午3:13
 */
public class ComplexDIApplication {
    public static void main(String[] args) {
        ApplicationContext ctx = new AnnotationConfigApplicationContext(ComplexDiConfig.class);
        Dog dog = ctx.getBean(Dog.class);
        System.out.println(dog);

        Cat cat = ctx.getBean(Cat.class);
        System.out.println(cat);
    }
}
